home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
8_6.lha
/
8_6
/
8_6_init.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
992b
|
36 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ declare a suitable amount of buffer space for cout
tatic char cout_buf[BUFSIZ];
/ Make a filebuf to manage that space.
/ Bind it to the UNIX FILE pointer stdout
tatic filebuf cout_file
(stdout, cout_buf, sizeof(cout_buf));
/ make the ostream providing the user interface
stream cout(&cout_file);
/ declare a suitable amount of buffer space for cerr
tatic char cerr_buf[1];
/ Make a filebuf to manage that space.
/ Bind it to the UNIX FILE pointer stderr
tatic filebuf cerr_file
(stderr, cerr_buf, sizeof(cerr_buf));
stream cerr(&cerr_file);
/ declare a suitable amount of buffer space for cin
tatic char cin_buf[BUFSIZ];
/ Make a filebuf to manage that space.
/ Bind it to the UNIX FILE pointer stdin
tatic filebuf cin_file
(stdin, cin_buf, sizeof(cin_buf));
/ make the istream providing the user interface
stream cin(&cin_file);